<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link href="_system/css/common.css" rel="stylesheet" type="text/css">
<link href="_system/images/skin.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="_system/js/common.js"></script>
<script type="text/javascript" src="_system/js/validation-framework.js" charset="gbk"></script>
<body>
	<s:form id="listForm" name="listForm" action="query_repair" method="post" 
		theme="simple" onsubmit="return doValidate('listForm')">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="17" height="29" valign="top" background="_system/images/mail_leftbg.gif">
				<img src="_system/images/left-top-right.gif" width="17" height="29" />
			</td>
			<td width="935" height="29" valign="top" background="_system/images/content-bg.gif">
				<table width="100%" height="31" border="0" cellpadding="0"
					cellspacing="0" class="left_topbg" id="table2">
					<tr>
						<td height="31">
							<div class="titlebt">
								报修管理
								<s:hidden name="position" id="position" value="repair"></s:hidden>
							</div>
						</td>
					</tr>
				</table>
			</td>
			<td width="16" valign="top" background="_system/images/mail_rightbg.gif">
				<img src="_system/images/nav-right-bg.gif" width="16" height="29" />
			</td>
		</tr>
		<tr>
			<td height="71" valign="middle" background="_system/images/mail_leftbg.gif">
				&nbsp;
			</td>
			<td valign="top" bgcolor="#F7F8F9">
				<table width="100%" height="138" border="0" cellpadding="0"
					cellspacing="0">
					<tr>
						<td height="13" valign="top">
							&nbsp;
						</td>
					</tr>
					<tr>
						<td valign="top">
							<s:form theme="simple">
								<table width="98%" border="0" align="center" cellpadding="0"
									cellspacing="0">
									<tr>
										<td class="left_txt">
											当前位置：报修管理
										</td>
									</tr>
									<tr>
										<td height="20">
											<table width="100%" height="1" border="0" cellpadding="0"
												cellspacing="0" bgcolor="#CCCCCC">
												<tr>
													<td></td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td>
											<table width="100%" height="55" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td width="10%" height="55" valign="middle">
														<img src="_system/images/title.gif" width="54" height="55">
													</td>
													<td width="90%" valign="top">
														<span class="left_txt2">报修管理</span>
													</td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td>
											&nbsp;
										</td>
									</tr>
									<tr>
										<td>
											<table width="100%" height="31" border="0" cellpadding="0"
												cellspacing="0" class="nowtable">
												<tr>
													<td class="left_bt2" align="center">
														&nbsp;&nbsp;&nbsp;&nbsp;报修列表
													</td>
												</tr>
											</table>
										</td>
									</tr>
									<tr>
										<td>
											<table width="100%" border="0" cellspacing="0" cellpadding="0">
												<tr>
													<th width="10%" height="30" align="char" bgcolor="#f2f2f2" class="left_txt2" nowrap="nowrap">
														<s:a href="javaScript:doDeleteBatch('ids');">
															批量删除
														</s:a>
													</th>
													<th width="20%" height="30" align="center" bgcolor="#f2f2f2" class="left_txt2">
														原因
													</th>
													<th width="20%" height="30" align="center" bgcolor="#f2f2f2" class="left_txt2">
														日期
													</th>
													<th width="20%" height="30" align="center" bgcolor="#f2f2f2" class="left_txt2">
														住户
													</th>
													<th width="40%" height="30" align="center" bgcolor="#f2f2f2" class="left_txt2">
														操作
													</th>
												</tr>
												<s:iterator var="repair" value="%{#request.repairList}">
												<tr>
													<td width="10%" height="30" align="center" bgcolor="#f2f2f2" class="left_txt2">
														<s:checkbox name="ids" fieldValue="%{#repair.rid}"></s:checkbox>
													</td>
													<td width="20%" height="30" align="center" bgcolor="#f2f2f2" class="left_txt2">
														<s:property value="%{#repair.title}"/>
													</td>
													<td width="20%" height="30" align="center" bgcolor="#f2f2f2" class="left_txt2">
														<s:date var="rDate" name="%{#repair.rdate}" format="yyyy-MM-dd"/>
														<s:property value="%{#rDate}"/>
													</td>
													<td width="20%" height="30" align="center" bgcolor="#f2f2f2" class="left_txt2">
														<s:if test="%{null == #repair.tenements || \"0\" == #repair.tenements.size()}">
															&nbsp;
														</s:if>
														<s:else>
															<s:iterator var="tenement" value="%{#repair.tenements}">
																<s:a href="get_tenement?tenement.tid=%{#tenement.tid}">
																	<s:property value="%{#tenement.tname}"/>
																	&nbsp;
																</s:a>
															</s:iterator>
														</s:else>
													</td>
													<td width="40%" height="30" align="center" bgcolor="#f2f2f2" class="left_txt2">
														<s:a href="javascript:doDelete('repair.rid', '%{#repair.rid}');">
															删除
														</s:a>
														&nbsp;&nbsp;&nbsp;
														<s:a href="change_repair?repair.rid=%{#repair.rid}">
															编辑
														</s:a>
														&nbsp;&nbsp;&nbsp;
														<s:a href="get_repair?repair.rid=%{#repair.rid}">
															详情
														</s:a>
													</td>
												</tr>
												</s:iterator>
												<tr>
													<td width="10%" height="30" align="center" bgcolor="#f2f2f2" class="left_txt2" nowrap="nowrap">
														<s:a href="javascript:doReverse('ids');">
															反选
														</s:a>
														&nbsp;
														<s:a href="javascript:doChooseAll('ids');">
															全选
														</s:a>
													</td>
													<td colspan="4" height="30" align="center" bgcolor="#f2f2f2" class="left_txt2" nowrap="nowrap">
														&nbsp;&nbsp;&nbsp;&nbsp;
													</td>
												</tr>
												<tr>
													<td colspan="4" align="center" class="left_txt2" valign="middle" height="100px">
														&nbsp;&nbsp;&nbsp;&nbsp;
													    <s:if test="%{#request.page.hasPrePage == true}">
												    		<s:a href="javaScript:doPagination('0');">首页</s:a>
												    		&nbsp;&nbsp;&nbsp;&nbsp;
												    		<s:a href="javaScript:doPagination('%{#request.page.currentPage - 1}');">上一页</s:a>
													    </s:if>
													    <s:else>
													    	首页&nbsp;&nbsp;&nbsp;&nbsp;
													    	上一页&nbsp;&nbsp;&nbsp;&nbsp;
													    </s:else>
													    <s:if test="%{#request.page.hasNextPage == true}">
													   		<s:a href="javaScript:doPagination('%{#request.page.currentPage + 1}');">下一页</s:a>
													    	&nbsp;&nbsp;&nbsp;&nbsp;
													    	<s:a href="javaScript:doPagination('%{#request.page.totalPage}');">尾页</s:a>
													    </s:if>
													    <s:else>
													    	下一页&nbsp;&nbsp;&nbsp;&nbsp;
													    	尾页&nbsp;&nbsp;&nbsp;&nbsp;
													    </s:else>
											    		页次${page.currentPage}/${page.totalPage}&nbsp;&nbsp;&nbsp;共${page.totalCount}条记录
													    &nbsp;&nbsp;&nbsp;&nbsp;
														 每页显示：
													    <s:textfield id="perPage" name="page.everyPage" size="1" maxlength="2" value="%{#request.page.everyPage}"></s:textfield>
													    <s:a href="javaScript:doFormSubmit('page');">+</s:a>													    
													    &nbsp;&nbsp;&nbsp;&nbsp;
													 	转到：
													 	<s:bean name="org.apache.struts2.util.Counter" id="counter" var="pageCounter">
													 		<s:param name="first" value="1"></s:param>
													 		<s:param name="last" value="%{#request.page.totalPage}"></s:param>
													 	</s:bean>
														<s:select id="curPage" name="page.currentPage" list="%{#pageCounter}" value="%{#request.page.currentPage}" onchange="doFormSubmit('page');">
														</s:select>
														页
													    <div align="center"></div>
													    <s:div>
													    	<s:iterator var="condition" value="%{#request.conList}" status="conST">
													    		<s:hidden name="%{'conList[' + #conST.index + '].propertyName'}" value="%{#condition.propertyName}"></s:hidden>
													    		<s:hidden name="%{'conList[' + #conST.index + '].relation'}" value="%{#condition.relation}"></s:hidden>
													    		<s:iterator var="conValue" value="%{#condition.values}">
														    		<s:hidden name="%{'conList[' + #conST.index + '].values'}" value="%{#conValue}"></s:hidden>
													    		</s:iterator>
													    		<s:iterator var="conType" value="%{#condition.types}">
														    		<s:hidden name="%{'conList[' + #conST.index + '].types'}" value="%{#conType}"></s:hidden>
													    		</s:iterator>
													    	</s:iterator>
														</s:div>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</s:form>
						</td>
					</tr>
				</table>
			</td>
			<td background="_system/images/mail_rightbg.gif">
				&nbsp;
			</td>
		</tr>
		<tr>
			<td valign="middle" background="_system/images/mail_leftbg.gif">
				<img src="_system/images/buttom_left2.gif" width="17" height="17" />
			</td>
			<td height="17" valign="top" background="_system/images/buttom_bgs.gif">
				<img src="_system/images/buttom_bgs.gif" width="17" height="17" />
			</td>
			<td background="_system/images/mail_rightbg.gif">
				<img src="_system/images/buttom_right2.gif" width="16" height="17">
			</td>
		</tr>
	</table>
	</s:form>
</body>

